﻿<phone:PhoneApplicationPage 
    x:Class="Coding4Fun.Phone.TestApplication.Samples.ChatBubbles.ChatBubbleTextBoxes"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:ms="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:c4f="clr-namespace:Coding4Fun.Phone.Controls;assembly=Coding4Fun.Phone.Controls" mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
		<ms:Pivot Title="{StaticResource AppName}">
            <!--Pivot item one-->
            <ms:PivotItem Header="basic">
				<StackPanel>
					<c4f:ChatBubbleTextBox 
						Text="testing normal"
						Margin="48, 0, 0, 0" />
					<c4f:ChatBubbleTextBox 
						IsReadOnly="True"
						Text="testing readonly"
						Margin="48, 0, 0, 0" />
					
					<c4f:ChatBubbleTextBox 
						Text="testing wrapping: coding4fun coding4fun coding4fun"
						TextWrapping="Wrap"
						/>

					<c4f:ChatBubbleTextBox 
						Margin="48, 0, 0, 0"
						Padding="24"
						Text="testing ReadOnly wrapping: coding4fun coding4fun coding4fun coding4fun" 
						IsReadOnly="True" 
						TextWrapping="Wrap" />

					<c4f:ChatBubbleTextBox 
						
						Text="testing disabled" 
						IsEnabled="False" />
					<TextBlock>System TextBoxes</TextBlock>
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition />
							<ColumnDefinition />
							<ColumnDefinition />
						</Grid.ColumnDefinitions>

						<TextBox Grid.Column="0" Text="normal" />
						<TextBox Grid.Column="1" IsReadOnly="True" Text="readonly" />
						<TextBox Grid.Column="2" IsEnabled="False" Text="disabled" />
					</Grid>

				</StackPanel>
			</ms:PivotItem>

            <!--Pivot item two-->
            <ms:PivotItem Header="direction">
				<StackPanel>
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition />
							<RowDefinition Height="12" />
							<RowDefinition />
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition />
							<ColumnDefinition Width="12" />
							<ColumnDefinition />
						</Grid.ColumnDefinitions>
						<c4f:ChatBubbleTextBox 
							Grid.Row="0"
							Grid.Column="0"
							Text="UpperRight"
							ChatBubbleDirection="UpperRight" />
						<c4f:ChatBubbleTextBox 
							Grid.Row="0"
							Grid.Column="2"
							Text="UpperLeft"
							ChatBubbleDirection="UpperLeft" />

						<c4f:ChatBubbleTextBox 
							Grid.Row="2"
							Grid.Column="0"
							Text="LowerRight"
							ChatBubbleDirection="LowerRight" />

						<c4f:ChatBubbleTextBox 
							Grid.Row="2"
							Grid.Column="2"
							Text="LowerLeft"
							ChatBubbleDirection="LowerLeft" />
					</Grid>
				</StackPanel>
			</ms:PivotItem>
			<ms:PivotItem Header="hint">
				<StackPanel>
					<c4f:ChatBubbleTextBox 
						Hint="type a message"/>
					<c4f:ChatBubbleTextBox 
						Text="i'm a message with a hint"
						Hint="type a message"/>
					<c4f:ChatBubbleTextBox 
						Hint="read only hint"
						IsReadOnly="True"/>
					<c4f:ChatBubbleTextBox 
						Hint="read only hint"
						Text="read only text"
						IsReadOnly="True"/>
					<c4f:ChatBubbleTextBox 
						Hint="disabled hint"
						IsEnabled="False"/>
					<c4f:ChatBubbleTextBox 
						Hint="disabled hint"
						Text="disabled text"
						IsEnabled="False"/>

					<c4f:ChatBubbleTextBox 
						Name="DynamicTextHintTest"
						Hint="testing dynamic text"/>

					<Button Click="Button_Click">Add text</Button>

				</StackPanel>
			</ms:PivotItem>
			<ms:PivotItem Header="color">
				<StackPanel>
					<c4f:ChatBubbleTextBox Background="{StaticResource PhoneAccentBrush}" Text="accent background" />
					<c4f:ChatBubbleTextBox Foreground="{StaticResource PhoneAccentBrush}" Text="accent foreground" />

					<c4f:ChatBubbleTextBox SelectionBackground="Firebrick" Text="firebrick selected background" />
					<c4f:ChatBubbleTextBox SelectionForeground="Firebrick" Text="firebrick selected foreground" />
				</StackPanel>
			</ms:PivotItem>
		</ms:Pivot>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->
    
</phone:PhoneApplicationPage>